package com.jiezuo.auth.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jiezuo.common.base.BaseEntity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* @description   企业管理
* @author        庞留杰
* @date          2020/08/26 14:37
* @version       V1.0
**/
//企业管理")
@Data
@TableName(value = "sys_enterprise")
public class Enterprise extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	//编号")
	private String code;

	//名称")
	private String name;

	//上级ID")
	private String pid;

	//省ID")
	private String province_id;

	//市ID")
	private String city_id;

	//县ID")
	private String area_id;

	//地址")
	private String address;

	//是否启用：0否，1是")
	private String status;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	//开始时间")
	private Date start_time;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	//结束时间")
	private Date end_time;

	//负责人ID")
	private String user_id;

	@TableField(exist = false)
	//企业位置")
	private String enterprise_district;

	@TableField(exist = false)
	//创建人姓名")
	private String user_name;

	//祖级列表")
	private String ancestors;

	@TableField(exist = false)
	private List<Enterprise> children;
}
